<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/12/20
  Time: 23:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.shenyun.pojo.Student" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>学生管理系统-班级成绩</title>
    <jsp:include page="/conme/had.jsp" flush="true" />
    <!--开始::内容-->
    <div class="clear mt-20 mr-15 ml-15">
        <div class="fl">
            <button class="btn btn-warning" onclick="nudop()"><i class="icon-cog"></i>新增</button>
            <button class="btn btn-danger" onclick="nudop()"><i class="icon-trash"></i>删除</button>
            <button class="btn btn-disabled" onclick="nudop()"><i class="icon-remove-sign"></i>更新</button>
        </div>
        <div class="fr input-group">
            <form action="/student/showScoreByGradeServlet" method="get">
                <input type="text" class="form-control" name="grade" placeholder="输入年级" style="width:290px;"/>
                <input type="text" class="form-control" name="clbum" placeholder="输入班级" style="width:290px;"/>
                <button class="btn btn-secondary">搜索</button>
            </form>
        </div>
    </div>
    <table class="table table-bordered mr-15 ml-15 mt-15">
        <thead>
        <tr class="cen">
            <th>学号</th>
            <th>姓名</th>
            <th>年级</th>
            <th>班级</th>
            <th>性别</th>
            <th>年龄</th>
            <th>语文</th>
            <th>数学</th>
            <th>英语</th>
        </tr>
        </thead>
        <tbody id="list">
            <c:forEach var="member" items="${studentlist}">
                <tr class="cen">
                    <td>${member.number}</td>
                    <td>${member.name}</td>
                    <td>${member.grade}</td>
                    <td>${member.clbum}</td>
                    <td>${member.gender}</td>
                    <td>${member.age}</td>
                    <c:choose>
                        <c:when test="${not empty member.scores}">
                            <td>${member.scores.chinese}</td>
                            <td>${member.scores.math}</td>
                            <td>${member.scores.english}</td>
                        </c:when>
                        <c:otherwise>
                            <td colspan="3">无成绩</td>
                        </c:otherwise>
                    </c:choose>
                </tr>
            </c:forEach>
        </tbody>
    </table>
    <div class="pagination fr"></div>
    <!--结束::内容-->
    <jsp:include page="/conme/footd.jsp" flush="true" />
    </body>
    <script>
        //待开发提示
        function nudop(){
            alert("联系月月开发吧！")
        }
    </script>
</html>
